package com.sky.controller.user;

import com.sky.dto.OrdersDTO;
import com.sky.dto.OrdersSubmitDTO;
import com.sky.result.Result;
import com.sky.service.OrdersService;
import com.sky.vo.OrderSubmitVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user/order")
public class OrdersController {
    @Autowired
    OrdersService ordersService;
    @PostMapping("/submit")
    public Result orders(@RequestBody OrdersSubmitDTO ordersSubmitDTO){

        return ordersService.addorders(ordersSubmitDTO);
    }
}
